package com.test.test_rest.blockchain_data.domain.gen;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class SuperTranGridData implements Serializable {
    private Integer id;

    private Integer jobId;

    /**
     * 币对
     */
    private String symbol;

    /**
     * 买入均价
     */
    private BigDecimal price;

    /**
     * 买入数量
     */
    private BigDecimal sumNum;

    /**
     * 买入费用
     */
    private BigDecimal sumUsdt;

    /**
     * 交易状态;success;fail
     */
    private String status;

    private Date createTime;

    private Date updateTime;

    /**
     * 补仓类型：1上涨；0下跌
     */
    private Integer coverType;

    /**
     * 上涨/下跌补仓比例(递增或递减后)；用于下次计算下次的上涨或下跌
     */
    private BigDecimal coverPercent;

    /**
     * 任务子ID
     */
    private Integer taskId;

    /**
     * 是否到达止盈比例1yes，0：no
     */
    private Integer stopProfit;

    /**
     * 达到止盈后的最高价格；用于计算止盈回调
     */
    private BigDecimal stopProfitPrice;

    /**
     * 是否到达补仓跌幅比例1yes，0：no
     */
    private Integer downWeight;

    /**
     * 达到补仓跌幅后的最低价格；用于计算补仓回调
     */
    private BigDecimal downWeightPrice;

    private static final long serialVersionUID = 1L;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getJobId() {
        return jobId;
    }

    public void setJobId(Integer jobId) {
        this.jobId = jobId;
    }

    /**
     * 币对
     */
    public String getSymbol() {
        return symbol;
    }

    /**
     * 币对
     */
    public void setSymbol(String symbol) {
        this.symbol = symbol;
    }

    /**
     * 买入均价
     */
    public BigDecimal getPrice() {
        return price;
    }

    /**
     * 买入均价
     */
    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    /**
     * 买入数量
     */
    public BigDecimal getSumNum() {
        return sumNum;
    }

    /**
     * 买入数量
     */
    public void setSumNum(BigDecimal sumNum) {
        this.sumNum = sumNum;
    }

    /**
     * 买入费用
     */
    public BigDecimal getSumUsdt() {
        return sumUsdt;
    }

    /**
     * 买入费用
     */
    public void setSumUsdt(BigDecimal sumUsdt) {
        this.sumUsdt = sumUsdt;
    }

    /**
     * 交易状态;success;fail
     */
    public String getStatus() {
        return status;
    }

    /**
     * 交易状态;success;fail
     */
    public void setStatus(String status) {
        this.status = status;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 补仓类型：1上涨；0下跌
     */
    public Integer getCoverType() {
        return coverType;
    }

    /**
     * 补仓类型：1上涨；0下跌
     */
    public void setCoverType(Integer coverType) {
        this.coverType = coverType;
    }

    /**
     * 上涨/下跌补仓比例(递增或递减后)；用于下次计算下次的上涨或下跌
     */
    public BigDecimal getCoverPercent() {
        return coverPercent;
    }

    /**
     * 上涨/下跌补仓比例(递增或递减后)；用于下次计算下次的上涨或下跌
     */
    public void setCoverPercent(BigDecimal coverPercent) {
        this.coverPercent = coverPercent;
    }

    /**
     * 任务子ID
     */
    public Integer getTaskId() {
        return taskId;
    }

    /**
     * 任务子ID
     */
    public void setTaskId(Integer taskId) {
        this.taskId = taskId;
    }

    /**
     * 是否到达止盈比例1yes，0：no
     */
    public Integer getStopProfit() {
        return stopProfit;
    }

    /**
     * 是否到达止盈比例1yes，0：no
     */
    public void setStopProfit(Integer stopProfit) {
        this.stopProfit = stopProfit;
    }

    /**
     * 达到止盈后的最高价格；用于计算止盈回调
     */
    public BigDecimal getStopProfitPrice() {
        return stopProfitPrice;
    }

    /**
     * 达到止盈后的最高价格；用于计算止盈回调
     */
    public void setStopProfitPrice(BigDecimal stopProfitPrice) {
        this.stopProfitPrice = stopProfitPrice;
    }

    /**
     * 是否到达补仓跌幅比例1yes，0：no
     */
    public Integer getDownWeight() {
        return downWeight;
    }

    /**
     * 是否到达补仓跌幅比例1yes，0：no
     */
    public void setDownWeight(Integer downWeight) {
        this.downWeight = downWeight;
    }

    /**
     * 达到补仓跌幅后的最低价格；用于计算补仓回调
     */
    public BigDecimal getDownWeightPrice() {
        return downWeightPrice;
    }

    /**
     * 达到补仓跌幅后的最低价格；用于计算补仓回调
     */
    public void setDownWeightPrice(BigDecimal downWeightPrice) {
        this.downWeightPrice = downWeightPrice;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", jobId=").append(jobId);
        sb.append(", symbol=").append(symbol);
        sb.append(", price=").append(price);
        sb.append(", sumNum=").append(sumNum);
        sb.append(", sumUsdt=").append(sumUsdt);
        sb.append(", status=").append(status);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", coverType=").append(coverType);
        sb.append(", coverPercent=").append(coverPercent);
        sb.append(", taskId=").append(taskId);
        sb.append(", stopProfit=").append(stopProfit);
        sb.append(", stopProfitPrice=").append(stopProfitPrice);
        sb.append(", downWeight=").append(downWeight);
        sb.append(", downWeightPrice=").append(downWeightPrice);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SuperTranGridData other = (SuperTranGridData) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getJobId() == null ? other.getJobId() == null : this.getJobId().equals(other.getJobId()))
            && (this.getSymbol() == null ? other.getSymbol() == null : this.getSymbol().equals(other.getSymbol()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getSumNum() == null ? other.getSumNum() == null : this.getSumNum().equals(other.getSumNum()))
            && (this.getSumUsdt() == null ? other.getSumUsdt() == null : this.getSumUsdt().equals(other.getSumUsdt()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getCoverType() == null ? other.getCoverType() == null : this.getCoverType().equals(other.getCoverType()))
            && (this.getCoverPercent() == null ? other.getCoverPercent() == null : this.getCoverPercent().equals(other.getCoverPercent()))
            && (this.getTaskId() == null ? other.getTaskId() == null : this.getTaskId().equals(other.getTaskId()))
            && (this.getStopProfit() == null ? other.getStopProfit() == null : this.getStopProfit().equals(other.getStopProfit()))
            && (this.getStopProfitPrice() == null ? other.getStopProfitPrice() == null : this.getStopProfitPrice().equals(other.getStopProfitPrice()))
            && (this.getDownWeight() == null ? other.getDownWeight() == null : this.getDownWeight().equals(other.getDownWeight()))
            && (this.getDownWeightPrice() == null ? other.getDownWeightPrice() == null : this.getDownWeightPrice().equals(other.getDownWeightPrice()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getJobId() == null) ? 0 : getJobId().hashCode());
        result = prime * result + ((getSymbol() == null) ? 0 : getSymbol().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getSumNum() == null) ? 0 : getSumNum().hashCode());
        result = prime * result + ((getSumUsdt() == null) ? 0 : getSumUsdt().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getCoverType() == null) ? 0 : getCoverType().hashCode());
        result = prime * result + ((getCoverPercent() == null) ? 0 : getCoverPercent().hashCode());
        result = prime * result + ((getTaskId() == null) ? 0 : getTaskId().hashCode());
        result = prime * result + ((getStopProfit() == null) ? 0 : getStopProfit().hashCode());
        result = prime * result + ((getStopProfitPrice() == null) ? 0 : getStopProfitPrice().hashCode());
        result = prime * result + ((getDownWeight() == null) ? 0 : getDownWeight().hashCode());
        result = prime * result + ((getDownWeightPrice() == null) ? 0 : getDownWeightPrice().hashCode());
        return result;
    }
}